# -*- coding:utf-8 -*-
import sys
from model.db_operate.mysql_helper import MysqlHelper
from datetime import date, datetime, timedelta
import pymysql
reload(sys)
sys.setdefaultencoding('utf-8')


# create db and tables
if __name__ == "__main__":
    day = date.today()
    now = datetime.now()
    delta = timedelta(days=7)  # days可以为正负数，当为负数时，n_days_after 与n_days_forward 的值与正数时相反；
    n_days_forward = now - delta  # 当前日期向前推n天的时间
    print(("当前日期：{}").format(day))
    print("向前推5天的日期：{}".format(n_days_forward.strftime('%Y-%m-%d')))


